/*
 * SignalGen.h
 *
 *  Created on: Apr 7, 2011
 *      Author: stud
 */

#ifndef SIGNALGEN_H_
#define SIGNALGEN_H_

#include <QObject>

#define PI 3.14159265

class SignalGen : public QObject {
	Q_OBJECT
public:
	enum WAVEFORMTYPE {
		TRIANGLE,
		SQUARE
	};
	SignalGen();
	virtual ~SignalGen();
public slots:
	void setWaveformType(int);
	void calcSample();
	void setFrequency(int);
	void setVoltage(int);

signals:
	void valueChanged(int);

private:
	double counter;
	int value;
	WAVEFORMTYPE waveformType;
	int frequency;
	int voltage;
};

#endif /* SIGNALGEN_H_ */
